import {Body, Controller, Post, UsePipes} from '@nestjs/common'
import {CreateCatDto, createCatDtoSchema} from './dto/create-cat.dto';
import {ZodValidationPipe} from './customPipes/zod-validation.pipe'

@Controller('cat')
export class CatController {
    @Post('create')
    @UsePipes(new ZodValidationPipe(createCatDtoSchema))
    async createMethod(@Body() createCatDto: CreateCatDto) {
        console.log(createCatDto)
        return createCatDto;
    }
}
